<?php

	function _n($count, $zero, $one, $many=null) {
		if(!is_numeric($count) && ($count instanceof Countable || is_array($count))) {
			$count = count($count);
		}
		if(is_null($many)) {
			// no text given for zero results
			$many = $one;
			$one = $zero;
			$zero = $many;
		}
		if($count == 0) {
			return sprintf($zero, $count);
		} elseif($count == 1) {
			return sprintf($one, $count);
		} else {
			return sprintf($many, $count);
		}
	}
	
?>